<?php print $controller->render('views/includes/header.php');?>

<?php if(isset($message)):?><p class="message"><?php print $message;?></p><?php endif;?>

<?php print $controller->render('views/includes/createurlForm.php');?>

<hr />

<h3>Make short urlTea URLs anywhere!</h3>
<div class='column'>
<h4>In your browser</h4>
<p>Drag the links below to your bookmarks toolbar:</p>
<p><a href="javascript:void(location.href='<?php echo BASE_URL; ?>create/?url='+escape(location.href))" class="bookmarklet">urlTea!</a></p>
<p class='inconsequential'><a href="<?php echo BASE_URL; ?>about/#bookmarklet">Help with this bookmarklet, Internet Explorer users</a></p>
</div>
<div class='column'>
<h4>via Instant Message</h4>
<p>Got Google Talk or Jabber?<br />Paste your URL in an IM to</p>
<p><a href='xmpp://teabot@urltea.com' class='bookmarklet'>teabot@urltea.com</a></p>
<p>and get a urlTea URL in reply!</p> 
</div>

<hr />

<script type="text/javascript">
	function twitterCallback(obj) {
		var id = obj[0].user.id;
		document.getElementById('my_twitter_status').innerHTML = obj[0].text;
		document.getElementById('my_twitter_status_time').innerHTML = obj[0].relative_created_at;
	}
</script>
<div id='twitter'><a href='http://www.twitter.com/urltea'>urlTea's Twitter</a>: <span id="my_twitter_status"></span> (<span id="my_twitter_status_time"></span>)</div>
<script type="text/javascript" src="http://www.twitter.com/t/status/user_timeline/1858971?callback=twitterCallback&count=1"></script>

<?php print $controller->render('views/includes/footer.php');?>